package Gui;


import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.SwingConstants;
import java.awt.Dimension;
import javax.swing.JTextPane;
import java.awt.Color;


@SuppressWarnings("serial")
public class playerPanel extends JPanel {
	private JLabel namelabel;
	public JTextPane Score;


	/**
	 * Create the panel.
	 * @param name 
	 */
	public playerPanel(String name) {
		setSize(new Dimension(161, 90));
		setPreferredSize(new Dimension(161, 90));
		setLayout(null);

		JLabel lblScore = new JLabel("Score:");
		lblScore.setForeground(Color.RED);
		lblScore.setBounds(0, 33, 55, 26);
		lblScore.setFont(new Font("Times New Roman", Font.ITALIC, 18));
		add(lblScore);

		namelabel = new JLabel(name);
		namelabel.setForeground(Color.RED);
		namelabel.setBounds(0, 0, 174, 36);
		namelabel.setHorizontalAlignment(SwingConstants.CENTER);
		namelabel.setFont(new Font("Bookman Old Style", Font.BOLD | Font.ITALIC, 19));
		add(namelabel);

		Score = new JTextPane();
		Score.setEditable(false);
		Score.setBounds(49, 39, 89, 20);
		Score.setBackground(Color.LIGHT_GRAY);
		add(Score);
	}


	public JLabel getNamelabel() {
		return namelabel;
	}


	public void setScore(int sc) {
		this.Score.setText(""+sc);
	}


	public void setPName(String name) {
		namelabel.setText(name);	
	}


}
